package com.lenovo.study.service.impl;

import com.lenovo.study.dao.UserMapper;
import com.lenovo.study.model.User;
import com.lenovo.study.service.DistributedLock;
import com.lenovo.study.service.UserService;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Author: fuxh3@lenovo.com
 * Date: Created in 2017/9/5 0005
 */
@Service
public class UserServiceImpl implements UserService{
    private static final Logger logger = LogManager.getLogger(UserServiceImpl.class);
    @Autowired
    private UserMapper userMapper;
    private DistributedLock lock = new RedisDistributedLock();
    @Override public User getByUserName(String username) {
        User user = userMapper.getByUserName("付晓辉");
        logger.info("From db to get User");
        return user;
    }
}
